; verson 1 from book
(defun our-equal (x y)
	(or (eql x y)
			(and (consp x)
					 (consp y)
					 (our-equal (car x) (car y))
					 (our-equal (cdr x) (cdr y)))))

(format t "~A~%" (our-equal '(a b c) '(a b c)))
(format t "~A~%" (our-equal '(a b c) '(a b d)))

; my version
(defun my-equal (x y)
	(or (eql x y)
			(if (not (eql (car x) (car y)))
				nil
				(my-equal (cdr x) (cdr y)))))
				
(format t "~A~%" (my-equal '(a b c) '(a b c)))
(format t "~A~%" (my-equal '(a b c) '(a b d)))
